package aop03;

import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/5/18 9:01
 * Version:1.0-SNAPSHOT
 * Description:
 */
public class WelcomeAdvice implements AfterReturningAdvice {

    /**
     * 后置通知
     * @param returnValue   目标方法的返回值
     * @param method
     * @param args
     * @param target
     * @throws Throwable
     */
    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("后置通知:"+method.getName()+"方法执行成功,方法的返回值为:"+returnValue);
    }
}
